<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行内块</title>
    <style>
        div {
            display: inline-block;
            width: 100px;
            height: 100px;
            background-color: cadetblue;
        }
    </style>
</head>
<body>
    <!-- inline-block换行和有分隔符的情况下会产生间距 -->
    <div>1</div><div>2</div>
    <div>3</div>
    <div>4</div>
    <div>4</div>
</body>
</html>